<?php

namespace App\Modules\CodeDesigner\Builder;

class ProductB extends Builder
{
    /**
     * @var Product
     */
    protected $product;

    public function __construct(Product $product)
    {
        $this->product = $product;
    }

    public function partA()
    {
        $this->product->create('Product B part A');
    }

    public function partB()
    {
        $this->product->create('Product B part B');
    }

    public function getResult(): Product
    {
        return $this->product;
    }
}